package ywpt.service.system;

import java.util.List;
import org.hibernate.criterion.DetachedCriteria;
import ywpt.components.acegi.domain.Operation;

public interface OperationService {
	public abstract Operation getOperationById(Long id);

	public abstract List<Operation> getAllOperations();

	@SuppressWarnings("unchecked")
	public abstract List<Operation> getOperations(DetachedCriteria query);

	@SuppressWarnings("unchecked")
	public abstract List<Operation> getOperations(DetachedCriteria query, int pageSize, int startIndex);

	public abstract int getOperationsCount(DetachedCriteria query);

	public abstract void addRoles(Operation oper, List<Long> roles);
	
	public abstract int[] removeRoles(Operation oper, Long[] ids);
	
	public abstract Operation getOperationByOperationName(String operationName);

	@SuppressWarnings("unchecked")
	public abstract List getOperationTree(Long parentId,List roles);
	
	@SuppressWarnings("unchecked")
	public abstract List getOperationTree(Long parentId);

}
